import req from '@/lib/axios'
const $API = '/api'

//批量创建订单
const createOrder = data => req.post(
  `${$API}/trade/createOrder`,
  data
);

//分页订单列表
const pagingOrder = data => req.post(
  `${$API}/trade/pagingOrder`,
  data
);

//查询订单详情
const detailOrder = data => req.post(
  `${$API}/trade/detailOrder`,
  data
);

//插入或修改订单
const upsertOrder = data => req.post(
  `${$API}/trade/upsertOrder`,
  data
);

export default {
  createOrder,
  pagingOrder,
  detailOrder,
  upsertOrder,
}